class ConSquadAI extends UTSquadAI;

function Initialize(UTTeamInfo T, UTGameObjective O, Controller C)
{
	Team = T;
	SetLeader(C);
	
	// Kyle: Making the objective optional without actually setting it as such - changed false to true
	if (O != none) SetObjective(O,true);
}

function SetObjective(UTGameObjective O, bool bForceUpdate)
{
	local UTBot M;
	
	`log("Con: SquadAI - SetObjective "$O);
	
	bForceNetUpdate = TRUE;
	SquadObjective = O;

	for	( M=SquadMembers; M!=None; M=M.NextSquadMember )
		if ( M.Pawn != None )
		{
			if (ConObjective(O).ConOwnerTeam == Team.TeamIndex)
			{
				`log("Con: SquadAI - Objective Is Mine");
				O.TellBotHowToHeal(M);
			} else {
				`log("Con: SquadAI - Objective Is Mine");
				O.TellBotHowToDisable(M);
			}
			Retask(M);
		}
}

function SetBattle()
{

}

DefaultProperties
{
	name="ConSquadAI"
}
